<!--
 * @Author: wuyuxin
 * @Date: 2022-01-17 15:51:05
 * @LastEditors: wuyuxin
 * @LastEditTime: 2022-01-25 10:15:47
 * @Description: 
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box {
      width: 600px;
      height: 400px;
      /* background: blue; */
    }
  </style>
</head>

<body>
  <div class="box"></div>
  <script src="js/echarts.min.js"></script>
  <script>
    // echarts.init(dom容器)
    // 基于准备好的dom，初始化echarts实例
    var myEcharts = echarts.init(document.querySelector(".box"))

    // 指定图表的配置项和数据
    var option = {
      title: {
        text: '测试 ECharts'
      },
      tooltip: {},
      legend: {
        data: ['销量']
      },
      xAxis: {
        data: ["衬衫", "短袖", "皮鞋", "裤子", "高跟鞋", "袜子"]
      },
      yAxis: {},
      series: [{
        name: '销量',
        type: 'line',
        data: [9, 10, 36, 19, 14, 20]
      }]
    };

    // 使用刚指定的配置项和数据显示图表。
    myEcharts.setOption(option);
  </script>
</body>

</html>